{% extends "base.html" %}

{% block content %}
<div class="row">
    {% for room in rooms %}
    <div class="col-md-4 mb-4">
        <div class="card">
            <img src="{{ url_for('static', filename='images/' + room.image) }}" 
                 class="card-img-top" 
                 alt="{{ room.name }}"
                 style="height: 200px; object-fit: cover">
            <div class="card-body">
                <h5 class="card-title">{{ room.name }}</h5>
                <p class="card-text">{{ room.description }}</p>
                <a href="{{ url_for('book_room', room_id=room.id) }}" 
                   class="btn btn-primary">
                   立即预约
                </a>
            </div>
        </div>
    </div>
    {% endfor %}
</div>
{% endblock %}